// seq
#include "seq/Sequence.h"

// editor
#include "MainWindow.h"
#include "EditEventHandler.h"

namespace editor {

using namespace seq;
using namespace boost;

void UpdateEventHandler::execute(boost::any event) {
    Screen& screen = g_window.getScreen(screenID_);
    screen.update();
    screen.draw();
}

void ScrollBindEventHandler::execute(boost::any event) {
    int tick = any_cast<unsigned>(event);
    if (screenID_) {
        g_window.moveTick(screenID_, tick);
    } else {
        g_window.moveTick(tick);
    }
    g_window.update();
    g_window.draw();
}

void ChangeTickPer4EventHandler::execute(boost::any event) {
    unsigned tickPer4 = any_cast<unsigned>(event);
    g_window.setTickPer4(tickPer4);
}

void UpdateMainStatusEventHandler::execute(boost::any event) {
    g_window.updateStatusBar();
}


} // end of namespace editor
